package com.dlxj.service.impl;

import java.util.List;

import com.dlxj.dao.BaseDAO;
import com.dlxj.entity.Model;
import com.dlxj.service.ModelService;

public class ModelServiceImpl implements ModelService {

	BaseDAO baseDAO;

	@Override
	public List<Model> findAllModel() {

		return (List<Model>) baseDAO.findByHql("from Model");
	}

	@Override
	public Model findModelById(int mid) {

		return (Model) baseDAO.findById(Model.class, mid);
	}

	public BaseDAO getBaseDAO() {
		return baseDAO;
	}

	public void setBaseDAO(BaseDAO baseDAO) {
		this.baseDAO = baseDAO;
	}

}
